package info.motteke.mixivoice4j.http;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public enum ImageType {

    JPEG, PNG, GIF;

    private static final Map<String, ImageType> types;

    static {
        Map<String, ImageType> map = new HashMap<String, ImageType>();

        map.put("image/jpeg", JPEG);
        map.put("image/png", PNG);
        map.put("image/gif", GIF);

        map = Collections.unmodifiableMap(map);
        types = map;
    }

    public static ImageType get(String mime){
        return types.get(mime);
    }
}
